#include <stdio..h>
#include <string.h>
#include <assert.h>

										//eg;输入 i am a good  输出： good a am i
void reverse(char*left,char*right)
{
	while (left < right)
	{
        assert(left);
        assert(right);
		char tem = *left;
		*left = *right;
		*right = tem;
		left++;
		right--;
	}
}
int main()
{
	char arr[101] = { 0 };
	gets(arr);
	int len = strlen(arr);
	//逆序字符串
	reverse(arr,arr+len-1); 
	//逆序每个单词
	char* start = arr;
	while (*start)
	{
		char* end = start;
		while (*end!=' '&&*end!='\0')
		{
			end++;
		}
		reverse(start, end - 1);
		if (*end != '\0')
			end++;
		start = end;
	}
	printf("%s\n", arr);
	return 0;
}
									//求最小公倍数
#include<string.h>
int main()
{
	int a = 0;
	int b = 0;
	scanf("%d %d", &a, &b);
	int i = 1;
	while (a*i%b)  //如果a*i%b =0,则表示找到最小公倍数a*i，此时为假，跳出循环，输出a*i
	{
		i++;
	}
	printf("%d\n", a * i);
	return 0;
}
												//输出调用多少次递归函数
int cnt = 0;
int fib(int n)                               //1次   //  8
{                                            //2次       7   6
	cnt++;                                   //4次      6 5 5 4
	if (n == 0)                              //8次		 5 4  4 3  4 3 3 2
		return 1; 		                     //16次     4 3  3 2  3 2  2 1 3 2  2 1 2 1 1 0		
	else if (n == 1)                         //22次    3 2 2 1 2 1 1 0 2 1 1 0 1 0 2 1 11 0 1 0 1 0
		return 2;                            //12次     2 1 1 0 1 0 1 0 1 0 1 0
	else                                     // 2次  1 0 
		return fib(n - 1) + fib(n - 2);      // add= 67次
}
int main()
{
	fib(8);
	printf("%d", cnt);
	return 0;
}